﻿<%@ Page Language="C#" MasterPageFile="~/SubForm.Master" AutoEventWireup="true" Codebehind="BDManagement.aspx.cs"
    Inherits="PreContractWeb.Administration.BDManagement" Title="BDMangement Page"
    EnableEventValidation="false" %>

<%@ Register Src="../UserControl/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="divError" runat="server" visible="false">
    </div>
    <div id="divConnect" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>

                <script language="javascript" type="text/javascript">
	  
   function ShowPage(id)
   {
    var arg = null;
  
     var top=(screen.height-350)/2;
     var left=(screen.width-800)/2;
     
     arg =  window.showModalDialog('EditBD.aspx?id='+id,'','dialogHeight:350px;dialogWidth:800px;dialogTop:'+top+';dialogLeft:'+left+';center:Yes;scroll:no;hidden;resizable:no;status:no;');
   
     if(arg != null)
     {
		document.getElementById('<%=returnvalue.ClientID%>').value   = arg[0];
     }
  }
  
   function ShowAssignmentPage(id)
   {
    var arg = null;
  
     var top=(screen.height-280)/2;
     var left=(screen.width-800)/2;
     
     arg =  window.showModalDialog('ChangeAssignment.aspx?type='+id,'','dialogHeight:280px;dialogWidth:800px;dialogTop:'+top+';dialogLeft:'+left+';center:Yes;scroll:no;hidden;resizable:no;status:no;');
   
     if(arg != null)
     {
		document.getElementById('<%=returnvalue.ClientID%>').value   = arg[0];
     }
  }
                </script>
  <input id="returnvalue" type="hidden" name="returnvalue" runat="server" />

                <table cellspacing="0" cellpadding="0" width="95%" border="0" align="center">
                    <tbody>
                        <tr>
                            <td valign="middle" align="left" height="50">
                                <table height="45" cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tbody>
                                        <tr>
                                            <td align="right" height="10">
                                                &nbsp;<asp:Button ID="ChangeButton" runat="server" Text="转换(Change)" CssClass="bgButton">
                                                </asp:Button>&nbsp;
                                                <asp:Button ID="btnadd" runat="server" Text="添加(Add)" CssClass="bgButton" ToolTip="添加BD">
                                                </asp:Button>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <div style="overflow: auto" id="divReport" runat="server">
                                <asp:GridView ID="gvBD" runat="server" Width="100%" PageSize="20" OnRowDataBound="gvBD_RowDataBound"
                                    DataKeyNames="BDID" AutoGenerateColumns="False">
                                    <PagerSettings Visible="False"></PagerSettings>
                                    <Columns>
                                        <asp:BoundField HtmlEncode="False" DataField="BDCode" HeaderText="事业部编号&lt;br/&gt;PUCode">
                                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                        </asp:BoundField>
                                        <asp:BoundField HtmlEncode="False" DataField="SortNumber" HeaderText="排号&lt;br/&gt;SortNumber">
                                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                        </asp:BoundField>
                                        <asp:BoundField HtmlEncode="False" DataField="BGCode" HeaderText="BG编号&lt;br/&gt;BGCode">
                                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                        </asp:BoundField>
                                        <asp:BoundField HtmlEncode="False" DataField="BDDescription" HeaderText="事业部描述&lt;br/&gt;PU Description">
                                            <ItemStyle HorizontalAlign="Left"></ItemStyle>
                                        </asp:BoundField>
                                        <asp:CheckBoxField ReadOnly="True" DataField="Active" HeaderText="是否可用&lt;br/&gt;Active">
                                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                        </asp:CheckBoxField>
                                        <asp:TemplateField HeaderText="编辑&lt;br/&gt;Edit">
                                            <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                            <ItemTemplate>
                                                <asp:ImageButton ID="imgedit" runat="server" ImageUrl="../images/COMEDIT.GIF" ToolTip="编辑PU信息" />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <RowStyle Height="20px" CssClass="table_row_1"></RowStyle>
                                    <SelectedRowStyle CssClass="SelectedRow"></SelectedRowStyle>
                                    <HeaderStyle CssClass="table_header"></HeaderStyle>
                                    <AlternatingRowStyle CssClass="table_row_2"></AlternatingRowStyle>
                                </asp:GridView>
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
        
    </div>

    <script language="javascript">
    window.attachEvent("onresize",resizeFunc1); 
    resizeFunc1();
  function resizeFunc1()
    {
        var parentWin=window.parent;
        if (parentWin!=null)
        {
            var ofrm=parentWin.document.getElementById("main");
            if (ofrm!=null)
            {
            
                var sHeight=ofrm.document.body.offsetHeight;
                var sWidth=ofrm.document.body.offsetWidth;
                var divReport=document.getElementById("ctl00_ContentPlaceHolder1_divReport");
                if (divReport!=null)
                {
                    divReport.style.width=sWidth-220;
                    divReport.style.height=sHeight-190;
                }
            }
        }
    }   
    </script>

</asp:Content>
